package com.heima.feign.wemedia;

import com.heima.model.apuser.dtos.NewsAuthDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author rookie001
 * @creat 2023-06-20-15:31
 */
@FeignClient("leadnews-wemedia")
public interface INewsClient {
    //分页查询
    @PostMapping("/api/v1/news/list_vo")
    ResponseResult getNewsList(@RequestBody NewsAuthDto dto);
    //查询详情
    @GetMapping("/api/v1/news/one_vo/{id}")
    ResponseResult getNewsDetail(@PathVariable("id") Integer id);
    //文章审核驳回
    @PostMapping("/api/v1/news/auth_fail")
    ResponseResult auditReject(@RequestBody NewsAuthDto dto);
    //文章审核通过
    @PostMapping("/api/v1/news/auth_pass")
    ResponseResult auditPass(@RequestBody NewsAuthDto dto);
}
